<?php

class admin_Form_Preferencias extends Zend_Form
{

    public function init()
    {
        $this->addElement(
                'text',
                'nome',
                array(
                    'label' => 'Nome: ',
					'readonly' => 'readonly',
					'class' => 'text-add cantos',
                    'required' => true,
                    'validators' => array(
                        new Zend_Validate_Alpha(true)
                    )
                )
        );
        
        $this->addElement(
                'password',
                'senha',
                array(
                    'label' => 'Senha: ',
					'class' => 'text-add cantos',
                    'validators' => array(
                        new Zend_Validate_Identical(Zend_Controller_Front::getInstance()->getRequest()->getParam('repita_senha'))
                    )
                )
        );

        $this->addElement(
                'password',
                'repita_senha',
                array(
                    'label' => 'Repita a Senha: ',
					'class' => 'text-add cantos',
                    'validators' => array(
                        new Zend_Validate_Identical(Zend_Controller_Front::getInstance()->getRequest()->getParam('senha'))
                    )
                )
        );

        $this->addElement(
                'submit',
                'submit_button',
                array(
                    'label' => 'Salvar',
					'class' => 'button green',
                    'ignore' => true
                )
        );
		$this->addElement(
                'button',
                'voltar',
                array(
                    'label' => 'voltar',
                    'onClick' => 'location.href="/admin"',
					'class' => 'button red ',
                    'ignore' => true
                )
        );

    }


}

